3.2.67 \(\int \frac {(a+b \log (c x^n))^2 (d+e \log (f x^r))}{x^2} \, dx\) [167]

3.2.67.1 Optimal result
3.2.67.2 Mathematica [A] (verified)
3.2.67.3 Rubi [A] (verified)
3.2.67.4 Maple [A] (verified)
3.2.67.5 Fricas [A] (verification not implemented)
3.2.67.6 Sympy [A] (verification not implemented)
3.2.67.7 Maxima [A] (verification not implemented)
3.2.67.8 Giac [A] (verification not implemented)
3.2.67.9 Mupad [B] (verification not implemented)

3.2.67.1 Optimal result

Integrand size = 26, antiderivative size = 181 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx=-\frac {2 b^2 e n^2 r}{x}-\frac {2 b e n (a+b n) r}{x}-\frac {e \left (a^2+2 a b n+2 b^2 n^2\right ) r}{x}-\frac {2 b^2 e n r \log \left (c x^n\right )}{x}-\frac {2 b e (a+b n) r \log \left (c x^n\right )}{x}-\frac {b^2 e r \log ^2\left (c x^n\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x} \]

output
-2*b^2*e*n^2*r/x-2*b*e*n*(b*n+a)*r/x-e*(2*b^2*n^2+2*a*b*n+a^2)*r/x-2*b^2*e 
*n*r*ln(c*x^n)/x-2*b*e*(b*n+a)*r*ln(c*x^n)/x-b^2*e*r*ln(c*x^n)^2/x-2*b^2*n 
^2*(d+e*ln(f*x^r))/x-2*b*n*(a+b*ln(c*x^n))*(d+e*ln(f*x^r))/x-(a+b*ln(c*x^n 
))^2*(d+e*ln(f*x^r))/x
 
3.2.67.2 Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.76 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx=-\frac {a^2 d+2 a b d n+2 b^2 d n^2+a^2 e r+4 a b e n r+6 b^2 e n^2 r+e \left (a^2+2 a b n+2 b^2 n^2\right ) \log \left (f x^r\right )+b^2 \log ^2\left (c x^n\right ) \left (d+e r+e \log \left (f x^r\right )\right )+2 b \log \left (c x^n\right ) \left (a (d+e r)+b n (d+2 e r)+e (a+b n) \log \left (f x^r\right )\right )}{x} \]

input
Integrate[((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/x^2,x]
 
output
-((a^2*d + 2*a*b*d*n + 2*b^2*d*n^2 + a^2*e*r + 4*a*b*e*n*r + 6*b^2*e*n^2*r 
 + e*(a^2 + 2*a*b*n + 2*b^2*n^2)*Log[f*x^r] + b^2*Log[c*x^n]^2*(d + e*r + 
e*Log[f*x^r]) + 2*b*Log[c*x^n]*(a*(d + e*r) + b*n*(d + 2*e*r) + e*(a + b*n 
)*Log[f*x^r]))/x)
 
3.2.67.3 Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 173, normalized size of antiderivative = 0.96, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2813, 25, 2010, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx\)

\(\Big \downarrow \) 2813

\(\displaystyle -e r \int -\frac {a^2+b^2 \log ^2\left (c x^n\right )+2 b n (a+b n)+2 b (a+b n) \log \left (c x^n\right )}{x^2}dx-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}\)

\(\Big \downarrow \) 25

\(\displaystyle e r \int \frac {a^2+b^2 \log ^2\left (c x^n\right )+2 b n (a+b n)+2 b (a+b n) \log \left (c x^n\right )}{x^2}dx-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}\)

\(\Big \downarrow \) 2010

\(\displaystyle e r \int \left (\frac {b^2 \log ^2\left (c x^n\right )}{x^2}+\frac {2 b (a+b n) \log \left (c x^n\right )}{x^2}+\frac {a^2+2 b n a+2 b^2 n^2}{x^2}\right )dx-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}\)

\(\Big \downarrow \) 2009

\(\displaystyle e r \left (-\frac {a^2+2 a b n+2 b^2 n^2}{x}-\frac {2 b (a+b n) \log \left (c x^n\right )}{x}-\frac {2 b n (a+b n)}{x}-\frac {b^2 \log ^2\left (c x^n\right )}{x}-\frac {2 b^2 n \log \left (c x^n\right )}{x}-\frac {2 b^2 n^2}{x}\right )-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x}-\frac {2 b^2 n^2 \left (d+e \log \left (f x^r\right )\right )}{x}\)

input
Int[((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/x^2,x]
 
output
e*r*((-2*b^2*n^2)/x - (2*b*n*(a + b*n))/x - (a^2 + 2*a*b*n + 2*b^2*n^2)/x 
- (2*b^2*n*Log[c*x^n])/x - (2*b*(a + b*n)*Log[c*x^n])/x - (b^2*Log[c*x^n]^ 
2)/x) - (2*b^2*n^2*(d + e*Log[f*x^r]))/x - (2*b*n*(a + b*Log[c*x^n])*(d + 
e*Log[f*x^r]))/x - ((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/x
 

3.2.67.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2010
Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x] 
, x] /; FreeQ[{c, m}, x] && SumQ[u] &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) 
+ (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]
 

rule 2813
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_ 
.)]*(e_.))*((g_.)*(x_))^(m_.), x_Symbol] :> With[{u = IntHide[(g*x)^m*(a + 
b*Log[c*x^n])^p, x]}, Simp[(d + e*Log[f*x^r])   u, x] - Simp[e*r   Int[Simp 
lifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, 
x] &&  !(EqQ[p, 1] && EqQ[a, 0] && NeQ[d, 0])
 
3.2.67.4 Maple [A] (verified)

Time = 8.10 (sec) , antiderivative size = 262, normalized size of antiderivative = 1.45

method result size
parallelrisch \(-\frac {6 b^{2} e \,n^{7} r +a^{2} e \,n^{5} r +2 a b d \,n^{6}+2 \ln \left (f \,x^{r}\right ) b^{2} e \,n^{7}+\ln \left (c \,x^{n}\right )^{2} b^{2} d \,n^{5}+2 \ln \left (c \,x^{n}\right ) b^{2} d \,n^{6}+\ln \left (f \,x^{r}\right ) a^{2} e \,n^{5}+4 a b e \,n^{6} r +e \,b^{2} \ln \left (f \,x^{r}\right ) \ln \left (c \,x^{n}\right )^{2} n^{5}+\ln \left (c \,x^{n}\right )^{2} b^{2} e \,n^{5} r +2 \ln \left (c \,x^{n}\right ) \ln \left (f \,x^{r}\right ) b^{2} e \,n^{6}+4 \ln \left (c \,x^{n}\right ) b^{2} e \,n^{6} r +2 \ln \left (f \,x^{r}\right ) a b e \,n^{6}+2 \ln \left (c \,x^{n}\right ) a b d \,n^{5}+2 \ln \left (c \,x^{n}\right ) \ln \left (f \,x^{r}\right ) a b e \,n^{5}+2 \ln \left (c \,x^{n}\right ) a b e \,n^{5} r +2 b^{2} d \,n^{7}+a^{2} d \,n^{5}}{x \,n^{5}}\) \(262\)
risch \(\text {Expression too large to display}\) \(8407\)

input
int((a+b*ln(c*x^n))^2*(d+e*ln(f*x^r))/x^2,x,method=_RETURNVERBOSE)
 
output
-1/x*(6*b^2*e*n^7*r+a^2*e*n^5*r+2*a*b*d*n^6+2*ln(f*x^r)*b^2*e*n^7+ln(c*x^n 
)^2*b^2*d*n^5+2*ln(c*x^n)*b^2*d*n^6+ln(f*x^r)*a^2*e*n^5+4*a*b*e*n^6*r+e*b^ 
2*ln(f*x^r)*ln(c*x^n)^2*n^5+ln(c*x^n)^2*b^2*e*n^5*r+2*ln(c*x^n)*ln(f*x^r)* 
b^2*e*n^6+4*ln(c*x^n)*b^2*e*n^6*r+2*ln(f*x^r)*a*b*e*n^6+2*ln(c*x^n)*a*b*d* 
n^5+2*ln(c*x^n)*ln(f*x^r)*a*b*e*n^5+2*ln(c*x^n)*a*b*e*n^5*r+2*b^2*d*n^7+a^ 
2*d*n^5)/n^5
 
3.2.67.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 311, normalized size of antiderivative = 1.72 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx=-\frac {b^{2} e n^{2} r \log \left (x\right )^{3} + 2 \, b^{2} d n^{2} + 2 \, a b d n + a^{2} d + {\left (b^{2} e r + b^{2} d\right )} \log \left (c\right )^{2} + {\left (2 \, b^{2} e n r \log \left (c\right ) + b^{2} e n^{2} \log \left (f\right ) + b^{2} d n^{2} + {\left (3 \, b^{2} e n^{2} + 2 \, a b e n\right )} r\right )} \log \left (x\right )^{2} + {\left (6 \, b^{2} e n^{2} + 4 \, a b e n + a^{2} e\right )} r + 2 \, {\left (b^{2} d n + a b d + {\left (2 \, b^{2} e n + a b e\right )} r\right )} \log \left (c\right ) + {\left (2 \, b^{2} e n^{2} + b^{2} e \log \left (c\right )^{2} + 2 \, a b e n + a^{2} e + 2 \, {\left (b^{2} e n + a b e\right )} \log \left (c\right )\right )} \log \left (f\right ) + {\left (b^{2} e r \log \left (c\right )^{2} + 2 \, b^{2} d n^{2} + 2 \, a b d n + {\left (6 \, b^{2} e n^{2} + 4 \, a b e n + a^{2} e\right )} r + 2 \, {\left (b^{2} d n + {\left (2 \, b^{2} e n + a b e\right )} r\right )} \log \left (c\right ) + 2 \, {\left (b^{2} e n^{2} + b^{2} e n \log \left (c\right ) + a b e n\right )} \log \left (f\right )\right )} \log \left (x\right )}{x} \]

input
integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x^2,x, algorithm="fricas")
 
output
-(b^2*e*n^2*r*log(x)^3 + 2*b^2*d*n^2 + 2*a*b*d*n + a^2*d + (b^2*e*r + b^2* 
d)*log(c)^2 + (2*b^2*e*n*r*log(c) + b^2*e*n^2*log(f) + b^2*d*n^2 + (3*b^2* 
e*n^2 + 2*a*b*e*n)*r)*log(x)^2 + (6*b^2*e*n^2 + 4*a*b*e*n + a^2*e)*r + 2*( 
b^2*d*n + a*b*d + (2*b^2*e*n + a*b*e)*r)*log(c) + (2*b^2*e*n^2 + b^2*e*log 
(c)^2 + 2*a*b*e*n + a^2*e + 2*(b^2*e*n + a*b*e)*log(c))*log(f) + (b^2*e*r* 
log(c)^2 + 2*b^2*d*n^2 + 2*a*b*d*n + (6*b^2*e*n^2 + 4*a*b*e*n + a^2*e)*r + 
 2*(b^2*d*n + (2*b^2*e*n + a*b*e)*r)*log(c) + 2*(b^2*e*n^2 + b^2*e*n*log(c 
) + a*b*e*n)*log(f))*log(x))/x
 
3.2.67.6 Sympy [A] (verification not implemented)

Time = 1.05 (sec) , antiderivative size = 280, normalized size of antiderivative = 1.55 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx=- \frac {a^{2} d}{x} - \frac {a^{2} e r}{x} - \frac {a^{2} e \log {\left (f x^{r} \right )}}{x} - \frac {2 a b d n}{x} - \frac {2 a b d \log {\left (c x^{n} \right )}}{x} - \frac {4 a b e n r}{x} - \frac {2 a b e n \log {\left (f x^{r} \right )}}{x} - \frac {2 a b e r \log {\left (c x^{n} \right )}}{x} - \frac {2 a b e \log {\left (c x^{n} \right )} \log {\left (f x^{r} \right )}}{x} - \frac {2 b^{2} d n^{2}}{x} - \frac {2 b^{2} d n \log {\left (c x^{n} \right )}}{x} - \frac {b^{2} d \log {\left (c x^{n} \right )}^{2}}{x} - \frac {6 b^{2} e n^{2} r}{x} - \frac {2 b^{2} e n^{2} \log {\left (f x^{r} \right )}}{x} - \frac {4 b^{2} e n r \log {\left (c x^{n} \right )}}{x} - \frac {2 b^{2} e n \log {\left (c x^{n} \right )} \log {\left (f x^{r} \right )}}{x} - \frac {b^{2} e r \log {\left (c x^{n} \right )}^{2}}{x} - \frac {b^{2} e \log {\left (c x^{n} \right )}^{2} \log {\left (f x^{r} \right )}}{x} \]

input
integrate((a+b*ln(c*x**n))**2*(d+e*ln(f*x**r))/x**2,x)
 
output
-a**2*d/x - a**2*e*r/x - a**2*e*log(f*x**r)/x - 2*a*b*d*n/x - 2*a*b*d*log( 
c*x**n)/x - 4*a*b*e*n*r/x - 2*a*b*e*n*log(f*x**r)/x - 2*a*b*e*r*log(c*x**n 
)/x - 2*a*b*e*log(c*x**n)*log(f*x**r)/x - 2*b**2*d*n**2/x - 2*b**2*d*n*log 
(c*x**n)/x - b**2*d*log(c*x**n)**2/x - 6*b**2*e*n**2*r/x - 2*b**2*e*n**2*l 
og(f*x**r)/x - 4*b**2*e*n*r*log(c*x**n)/x - 2*b**2*e*n*log(c*x**n)*log(f*x 
**r)/x - b**2*e*r*log(c*x**n)**2/x - b**2*e*log(c*x**n)**2*log(f*x**r)/x
 
3.2.67.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.22 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx=-b^{2} e {\left (\frac {r}{x} + \frac {\log \left (f x^{r}\right )}{x}\right )} \log \left (c x^{n}\right )^{2} - 2 \, a b e {\left (\frac {r}{x} + \frac {\log \left (f x^{r}\right )}{x}\right )} \log \left (c x^{n}\right ) - 2 \, {\left (\frac {{\left (r \log \left (x\right ) + 3 \, r + \log \left (f\right )\right )} n^{2}}{x} + \frac {n {\left (2 \, r + \log \left (f\right ) + \log \left (x^{r}\right )\right )} \log \left (c x^{n}\right )}{x}\right )} b^{2} e - 2 \, b^{2} d {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} - \frac {2 \, a b e n {\left (2 \, r + \log \left (f\right ) + \log \left (x^{r}\right )\right )}}{x} - \frac {b^{2} d \log \left (c x^{n}\right )^{2}}{x} - \frac {2 \, a b d n}{x} - \frac {a^{2} e r}{x} - \frac {2 \, a b d \log \left (c x^{n}\right )}{x} - \frac {a^{2} e \log \left (f x^{r}\right )}{x} - \frac {a^{2} d}{x} \]

input
integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x^2,x, algorithm="maxima")
 
output
-b^2*e*(r/x + log(f*x^r)/x)*log(c*x^n)^2 - 2*a*b*e*(r/x + log(f*x^r)/x)*lo 
g(c*x^n) - 2*((r*log(x) + 3*r + log(f))*n^2/x + n*(2*r + log(f) + log(x^r) 
)*log(c*x^n)/x)*b^2*e - 2*b^2*d*(n^2/x + n*log(c*x^n)/x) - 2*a*b*e*n*(2*r 
+ log(f) + log(x^r))/x - b^2*d*log(c*x^n)^2/x - 2*a*b*d*n/x - a^2*e*r/x - 
2*a*b*d*log(c*x^n)/x - a^2*e*log(f*x^r)/x - a^2*d/x
 
3.2.67.8 Giac [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 345, normalized size of antiderivative = 1.91 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx=-\frac {b^{2} e n^{2} r \log \left (x\right )^{3}}{x} - \frac {{\left (3 \, b^{2} e n^{2} r + 2 \, b^{2} e n r \log \left (c\right ) + b^{2} e n^{2} \log \left (f\right ) + b^{2} d n^{2} + 2 \, a b e n r\right )} \log \left (x\right )^{2}}{x} - \frac {{\left (6 \, b^{2} e n^{2} r + 4 \, b^{2} e n r \log \left (c\right ) + b^{2} e r \log \left (c\right )^{2} + 2 \, b^{2} e n^{2} \log \left (f\right ) + 2 \, b^{2} e n \log \left (c\right ) \log \left (f\right ) + 2 \, b^{2} d n^{2} + 4 \, a b e n r + 2 \, b^{2} d n \log \left (c\right ) + 2 \, a b e r \log \left (c\right ) + 2 \, a b e n \log \left (f\right ) + 2 \, a b d n + a^{2} e r\right )} \log \left (x\right )}{x} - \frac {6 \, b^{2} e n^{2} r + 4 \, b^{2} e n r \log \left (c\right ) + b^{2} e r \log \left (c\right )^{2} + 2 \, b^{2} e n^{2} \log \left (f\right ) + 2 \, b^{2} e n \log \left (c\right ) \log \left (f\right ) + b^{2} e \log \left (c\right )^{2} \log \left (f\right ) + 2 \, b^{2} d n^{2} + 4 \, a b e n r + 2 \, b^{2} d n \log \left (c\right ) + 2 \, a b e r \log \left (c\right ) + b^{2} d \log \left (c\right )^{2} + 2 \, a b e n \log \left (f\right ) + 2 \, a b e \log \left (c\right ) \log \left (f\right ) + 2 \, a b d n + a^{2} e r + 2 \, a b d \log \left (c\right ) + a^{2} e \log \left (f\right ) + a^{2} d}{x} \]

input
integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x^2,x, algorithm="giac")
 
output
-b^2*e*n^2*r*log(x)^3/x - (3*b^2*e*n^2*r + 2*b^2*e*n*r*log(c) + b^2*e*n^2* 
log(f) + b^2*d*n^2 + 2*a*b*e*n*r)*log(x)^2/x - (6*b^2*e*n^2*r + 4*b^2*e*n* 
r*log(c) + b^2*e*r*log(c)^2 + 2*b^2*e*n^2*log(f) + 2*b^2*e*n*log(c)*log(f) 
 + 2*b^2*d*n^2 + 4*a*b*e*n*r + 2*b^2*d*n*log(c) + 2*a*b*e*r*log(c) + 2*a*b 
*e*n*log(f) + 2*a*b*d*n + a^2*e*r)*log(x)/x - (6*b^2*e*n^2*r + 4*b^2*e*n*r 
*log(c) + b^2*e*r*log(c)^2 + 2*b^2*e*n^2*log(f) + 2*b^2*e*n*log(c)*log(f) 
+ b^2*e*log(c)^2*log(f) + 2*b^2*d*n^2 + 4*a*b*e*n*r + 2*b^2*d*n*log(c) + 2 
*a*b*e*r*log(c) + b^2*d*log(c)^2 + 2*a*b*e*n*log(f) + 2*a*b*e*log(c)*log(f 
) + 2*a*b*d*n + a^2*e*r + 2*a*b*d*log(c) + a^2*e*log(f) + a^2*d)/x
 
3.2.67.9 Mupad [B] (verification not implemented)

Time = 0.79 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.00 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx=-\ln \left (f\,x^r\right )\,\left (\ln \left (c\,x^n\right )\,\left (\frac {2\,a\,b\,e}{x}+\frac {2\,b^2\,e\,n}{x}\right )+\frac {a^2\,e}{x}+\frac {2\,b^2\,e\,n^2}{x}+\frac {b^2\,e\,{\ln \left (c\,x^n\right )}^2}{x}+\frac {2\,a\,b\,e\,n}{x}\right )-\frac {a^2\,d+2\,b^2\,d\,n^2+a^2\,e\,r+6\,b^2\,e\,n^2\,r+2\,a\,b\,d\,n+4\,a\,b\,e\,n\,r}{x}-\frac {2\,b\,\ln \left (c\,x^n\right )\,\left (a\,d+b\,d\,n+a\,e\,r+2\,b\,e\,n\,r\right )}{x}-\frac {b^2\,{\ln \left (c\,x^n\right )}^2\,\left (d+e\,r\right )}{x} \]

input
int(((d + e*log(f*x^r))*(a + b*log(c*x^n))^2)/x^2,x)
 
output
- log(f*x^r)*(log(c*x^n)*((2*a*b*e)/x + (2*b^2*e*n)/x) + (a^2*e)/x + (2*b^ 
2*e*n^2)/x + (b^2*e*log(c*x^n)^2)/x + (2*a*b*e*n)/x) - (a^2*d + 2*b^2*d*n^ 
2 + a^2*e*r + 6*b^2*e*n^2*r + 2*a*b*d*n + 4*a*b*e*n*r)/x - (2*b*log(c*x^n) 
*(a*d + b*d*n + a*e*r + 2*b*e*n*r))/x - (b^2*log(c*x^n)^2*(d + e*r))/x